package rcpexample.sampleview;


import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

public class ProjectView extends ViewPart {

public ProjectView() {}

public static ProjectTree mc = new ProjectTree("root");
public static TreeViewer treeViewer;

@Override
public void createPartControl(Composite parent) {
treeViewer = new TreeViewer(parent);
treeViewer.setContentProvider(new ProjectContentProvider());
treeViewer.setInput(getRootNode());
treeViewer.expandAll();
}

private ProjectTree getRootNode() {
ProjectTree node0 = new ProjectTree("Node0");
ProjectTree node1 = new ProjectTree("Node1");
mc.addChild(node0, "");
node0.addChild(node1, "");
return mc;
}

@Override
public void setFocus() {}

}